Merge branch 'cmakeWin' into dev
commit
5f03ab18f4
|
@ -2,7 +2,10 @@
|
||||||
build*/*
|
build*/*
|
||||||
*.so
|
*.so
|
||||||
public/
|
public/
|
||||||
|
<<<<<<< HEAD
|
||||||
*.exe
|
*.exe
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
|
|
||||||
# Eclispe setting --- do not ignore *.cproject and *.project
|
# Eclispe setting --- do not ignore *.cproject and *.project
|
||||||
*/**/.settings
|
*/**/.settings
|
||||||
|
@ -92,7 +95,11 @@ DocProject/Help/Html2
|
||||||
DocProject/Help/html
|
DocProject/Help/html
|
||||||
|
|
||||||
# Cmake, make and compiled objects on unix
|
# Cmake, make and compiled objects on unix
|
||||||
|
<<<<<<< HEAD
|
||||||
#*.cmake
|
#*.cmake
|
||||||
|
=======
|
||||||
|
*.cmake
|
||||||
|
>>>>>>> master
|
||||||
*.c.o
|
*.c.o
|
||||||
*/CMakeFiles/*
|
*/CMakeFiles/*
|
||||||
*/Makefile
|
*/Makefile
|
||||||
|
@ -142,6 +149,20 @@ Assets/AssetStoreTools*
|
||||||
# Visual Studio cache directory
|
# Visual Studio cache directory
|
||||||
.vs/
|
.vs/
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
# Visual Studio Code cache directory
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/settings.json
|
||||||
|
!.vscode/tasks.json
|
||||||
|
!.vscode/launch.json
|
||||||
|
!.vscode/extensions.json
|
||||||
|
*.code-workspace
|
||||||
|
|
||||||
|
# Local History for Visual Studio Code
|
||||||
|
.history/
|
||||||
|
|
||||||
|
>>>>>>> master
|
||||||
# Autogenerated VS/MD/Consulo solution and project files
|
# Autogenerated VS/MD/Consulo solution and project files
|
||||||
ExportedObj/
|
ExportedObj/
|
||||||
.consulo/
|
.consulo/
|
||||||
|
@ -175,6 +196,7 @@ sysinfo.txt
|
||||||
|
|
||||||
# Office
|
# Office
|
||||||
~*.pptx
|
~*.pptx
|
||||||
|
<<<<<<< HEAD
|
||||||
|
|
||||||
#Cython https://github.com/cython/cython/blob/master/.gitignore
|
#Cython https://github.com/cython/cython/blob/master/.gitignore
|
||||||
*.pyc
|
*.pyc
|
||||||
|
@ -215,3 +237,8 @@ callgrind.out.*
|
||||||
.cache
|
.cache
|
||||||
.pytest_cache
|
.pytest_cache
|
||||||
.mypy_cache
|
.mypy_cache
|
||||||
|
<<<<<<< HEAD
|
||||||
|
=======
|
||||||
|
=======
|
||||||
|
>>>>>>> master
|
||||||
|
>>>>>>> cmakeWin
|
||||||
|
|
|
@ -62,9 +62,12 @@ ENDIF(BUILD_STATIC_LIB)
|
||||||
|
|
||||||
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER ${SOURCE_HEADS})
|
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER ${SOURCE_HEADS})
|
||||||
|
|
||||||
# ADD DEFAULT COMPILER FLAGS
|
# Add compiler flags
|
||||||
include(CompilerFlags)
|
include(CompilerFlags)
|
||||||
|
|
||||||
|
# Install setup
|
||||||
|
install(TARGETS ${PROJECT_NAME} PERMISSIONS WORLD_WRITE )
|
||||||
|
|
||||||
find_package(OpenMP REQUIRED)
|
find_package(OpenMP REQUIRED)
|
||||||
if (OPENMP_FOUND)
|
if (OPENMP_FOUND)
|
||||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||||
|
|
|
@ -42,12 +42,17 @@ set(SOURCE_FILES main.c )
|
||||||
# Create the executable
|
# Create the executable
|
||||||
add_executable(demo ${SOURCE_FILES})
|
add_executable(demo ${SOURCE_FILES})
|
||||||
|
|
||||||
# Copy input files after build
|
# Copy input files for this example after build
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET demo POST_BUILD
|
TARGET demo POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.dat
|
${CMAKE_CURRENT_SOURCE_DIR}/userP.dat
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/ )
|
${CMAKE_CURRENT_BINARY_DIR}/userP.dat )
|
||||||
|
add_custom_command(
|
||||||
|
TARGET demo POST_BUILD
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/userQ.dat
|
||||||
|
${CMAKE_CURRENT_BINARY_DIR}/userQ.dat )
|
||||||
|
|
||||||
# PLATFORM-SPECIFIC SETTING
|
# PLATFORM-SPECIFIC SETTING
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
|
|
|
@ -77,7 +77,7 @@ int readinput(const char *inputfile, double ***pts, int * out) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Read number of input vertices. */
|
/* Read number of input vertices. */
|
||||||
if (fscanf_s(fp, "%d", &npoints) != 1)
|
if (fscanf(fp, "%d", &npoints) != 1)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* Allocate memory. */
|
/* Allocate memory. */
|
||||||
|
@ -88,7 +88,7 @@ int readinput(const char *inputfile, double ***pts, int * out) {
|
||||||
/* Read and store vertices' coordinates. */
|
/* Read and store vertices' coordinates. */
|
||||||
for (idx = 0; idx < npoints; idx++)
|
for (idx = 0; idx < npoints; idx++)
|
||||||
{
|
{
|
||||||
if (fscanf_s(fp, "%lf %lf %lf\n", &arr[idx][0], &arr[idx][1], &arr[idx][2]) != 3)
|
if (fscanf(fp, "%lf %lf %lf\n", &arr[idx][0], &arr[idx][1], &arr[idx][2]) != 3)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue