Tidied the CMakeLists, moved stuff to more logical places and added comments. Also tested that ALTER_CONF=ON still works
This commit is contained in:
@@ -25,6 +25,13 @@ set(CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS} ${CUDA_ARCH_FLAGS} ${CUDA_WARNING_FLAGS})
|
||||
set(CUDA_NVCC_FLAGS_RELEASE)
|
||||
set(CUDA_NVCC_FLAGS_DEBUG --device-debug --generate-line-info --ptxas-options=-v)
|
||||
|
||||
## Definitions
|
||||
if (MULTIGPU_ENABLED)
|
||||
add_definitions(-DAC_MULTIGPU_ENABLED=1)
|
||||
else ()
|
||||
add_definitions(-DAC_MULTIGPU_ENABLED=0)
|
||||
endif ()
|
||||
|
||||
## Create and link the library
|
||||
include_directories(.)
|
||||
cuda_add_library(astaroth_core STATIC astaroth.cu device.cu)
|
||||
|
||||
@@ -1,2 +1,9 @@
|
||||
##############################################
|
||||
## CMakeLists.txt for the C API test ##
|
||||
##############################################
|
||||
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
add_executable(ctest main.c)
|
||||
target_link_libraries(ctest PRIVATE astaroth_core)
|
||||
|
||||
1
src/ctest/README.txt
Normal file
1
src/ctest/README.txt
Normal file
@@ -0,0 +1 @@
|
||||
This directory is used to test whether the Astaroth API is compatible with C.
|
||||
@@ -2,6 +2,9 @@
|
||||
## CMakeLists.txt for Astaroth Standalone ##
|
||||
##############################################
|
||||
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
## Files
|
||||
file (GLOB SOURCES "*.cc" "model/*.cc")
|
||||
|
||||
@@ -17,7 +20,6 @@ if (BUILD_RT_VISUALIZATION)
|
||||
link_directories(${SDL2_LIBRARY_DIR})
|
||||
endif ()
|
||||
|
||||
|
||||
## Compilation flags
|
||||
add_compile_options(-march=native -pipe ${OpenMP_CXX_FLAGS})
|
||||
add_compile_options(-Wall -Wextra -Werror -Wdouble-promotion -Wfloat-conversion)# -Wshadow)
|
||||
|
||||
Reference in New Issue
Block a user