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