Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change how the bin/lib paths are set throughout CMakeLists #653

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ endif()
# Control target CUDA_ARCH to compile for
SET(CUDA_ARCH "${CUDA_ARCH}" CACHE STRING "List of CUDA Architectures to target. E.g. 61;70" FORCE)

# Set the lib and bin dirs early, so they do not need re-setting
include(cmake/set_output_directories.cmake)

# Define a function to add a lint target.
find_file(CPPLINT NAMES cpplint cpplint.exe)
if(CPPLINT)
Expand Down
2 changes: 2 additions & 0 deletions cmake/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ include(${FLAMEGPU_ROOT}/cmake/OutOfSourceOnly.cmake)
# Adds -gencode argumetns to cuda compiler options
# Adds -DMIN_COMPUTE_CAPABILITY=VALUE compiler defintions for C, CXX and CUDA
include(${CMAKE_CURRENT_LIST_DIR}/cuda_arch.cmake)
# Include cmake code to control the output directory settings
include(${CMAKE_CURRENT_LIST_DIR}/set_output_directories.cmake)

# Ensure that other dependencies are downloaded and available.
# As flamegpu is a static library, linking only only occurs at consumption not generation, so dependent targets must also know of PRIVATE shared library dependencies such as tinyxml2 and rapidjson, as well any intentionalyl public dependencies (for include dirs)
Expand Down
10 changes: 0 additions & 10 deletions cmake/dependencies/Tinyxml2.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,6 @@ if(NOT tinyxml2_POPULATED)
# @todo - make a dynamically generated CMakeLists.txt which can be add_subdirectory'd instead, so that the .vcxproj goes in a folder. Just adding a project doesn't work.
# project(tinyxml2 LANGUAGES CXX)

# Set location of static library files
# Define output location of static library
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../lib/${CMAKE_BUILD_TYPE}/)
endif()

# Depends on the cpp and header files in case of changes
add_library(tinyxml2 STATIC ${tinyxml2_SOURCE_DIR}/tinyxml2.cpp ${tinyxml2_SOURCE_DIR}/tinyxml2.h)
# Pic is sensible for any library
Expand Down
3 changes: 3 additions & 0 deletions cmake/dependencies/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ if(NOT googletest_POPULATED)
CMAKE_SET_TARGET_FOLDER("gtest" "Tests/Dependencies")
# Suppress warnigns from this target.
include(${CMAKE_CURRENT_LIST_DIR}/../warnings.cmake)
# Set output directories
include(${CMAKE_CURRENT_LIST_DIR}/../set_output_directories.cmake)
if(TARGET gtest)
DisableCompilerWarnings(TARGET gtest)
OverwriteOutputDirectoryProperties(TARGET gtest)
endif()
endif()

45 changes: 45 additions & 0 deletions cmake/set_output_directories.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Set CMake variables which influence the location of otuput artifacts such as executables, .so, .dll, .lib files.
# Do this by controlling the default variables, and also providing a function to reset per-target properties to the current global variables.

# Only set these if they have not already been set.
# Set them to be relative to the Project Source directory, i.e. the location of the first call to CMake
# CMAKE_BINARY_DIR is the top level build directory, so this should achieve the desired effect regardless of whether add_subdirectory is used or not.
if(NOT CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<CONFIG>)
endif()
if(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<CONFIG>)
endif()
if(NOT CMAKE_RUNTIME_OUTPUT_DIRECTORY)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>)
endif()
if(NOT CMAKE_PDB_OUTPUT_DIRECTORY)
set(CMAKE_PDB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/$<CONFIG>)
endif()

# Provide a target specific method to overwrite the values set on a target to the current values of the global CMAKE variables.
# This is to overwrite per target setting such as in gtest when using add_subdirectory.
function(OverwriteOutputDirectoryProperties)
# Parse the expected arguments, prefixing variables.
cmake_parse_arguments(
OODP
""
"TARGET"
""
${ARGN}
)
# Ensure that a target has been passed, and that it is a valid target.
if(NOT OODP_TARGET)
message( FATAL_ERROR "OverwriteOutputDirectoryProperties: 'TARGET' argument required." )
elseif(NOT TARGET ${OODP_TARGET} )
message( FATAL_ERROR "OverwriteOutputDirectoryProperties: TARGET '${OVERWRITE_OUTPUT_DIRECTORY_PROPERTIES_TARGET}' is not a valid target" )
endif()
# Set the various target properties to current cmake global variable
set_target_properties(${OODP_TARGET}
PROPERTIES
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
PDB_OUTPUT_DIRECTORY "${CMAKE_PDB_OUTPUT_DIRECTORY}"
)
endfunction()
9 changes: 0 additions & 9 deletions examples/boids_bruteforce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/boids_bruteforce_dependency_graph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/boids_rtc_bruteforce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/boids_rtc_spatial3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/boids_spatial3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/circles_bruteforce/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/circles_spatial3D/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/ensemble/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/game_of_life/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/host_functions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
9 changes: 0 additions & 9 deletions examples/sugarscape/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,6 @@ get_filename_component(FLAMEGPU_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../.. REALPATH)
# Include common rules.
include(${FLAMEGPU_ROOT}/cmake/common.cmake)

# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Prepare list of source files
# Can't do this automatically, as CMake wouldn't know when to regen (as CMakeLists.txt would be unchanged)
SET(ALL_SRC
Expand Down
4 changes: 1 addition & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,14 @@ set(DYNAMIC_VERSION_SRC_SRC "${FLAMEGPU_ROOT}/cmake/version.cpp.in")
set(DYNAMIC_VERSION_SRC_DEST "${CMAKE_CURRENT_BINARY_DIR}/src/flamegpu/version.cpp")
configure_file(${DYNAMIC_VERSION_SRC_SRC} ${DYNAMIC_VERSION_SRC_DEST} @ONLY)

# Define output location of static library
# Define output location of the doxygen target
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/)
if(${BUILD_API_DOCUMENTATION})
create_doxygen_target("${FLAMEGPU_ROOT}" "${CMAKE_CURRENT_BINARY_DIR}" "")
endif()
else()
# If called via add_subdirectory()
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../lib/${CMAKE_BUILD_TYPE}/)
if(${BUILD_API_DOCUMENTATION})
create_doxygen_target("${FLAMEGPU_ROOT}" "${CMAKE_CURRENT_BINARY_DIR}/.." "")
endif()
Expand Down
8 changes: 6 additions & 2 deletions swig/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ find_package(CUDAToolkit REQUIRED)
include(${FLAMEGPU_ROOT}/cmake/warnings.cmake)
# include CMake function to enable setting of gencode flags
include(${FLAMEGPU_ROOT}/cmake/cuda_arch.cmake)
# Set binary/library/archive output directories if not already set.
include(${FLAMEGPU_ROOT}/cmake/set_output_directories.cmake)
# Set the C++ and CUDA standard to use
include(${FLAMEGPU_ROOT}/cmake/cxxstd.cmake)
# Get FLAMEGPU Version information
Expand Down Expand Up @@ -39,11 +41,13 @@ endif()
# Set the output directory where the wheel etc should be placed.
# CMAKE 3.20 is required for byproducts contianing $<CONFIG> (i.e. multiconfig generators.) Workaround by only setting if supported, or usiing CMAKE_BUILD_TYPE for non-multi-generators.
# This is required for msvc multi-generator usage. For older cmake and non-mulit-config generators CMAKE_BUILD_TYPE can be used instead.
SET(PYTHON_LIB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/$<CONFIG>/python)
SET(PYTHON_LIB_OUTPUT_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/python)
SET(PYTHON_LIB_OUTPUT_DIRECTORY_BYPRODUCTS TRUE)
if(${CMAKE_VERSION} VERSION_LESS "3.20")
if(NOT ${GENERATOR_IS_MULTI_CONFIG})
SET(PYTHON_LIB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/python)
string(REPLACE "$<CONFIG>" "${CMAKE_BUILD_TYPE}" PYTHON_LIB_OUTPUT_DIRECTORY "${PYTHON_LIB_OUTPUT_DIRECTORY}")
message("PYTHON_LIB_OUTPUT_DIRECTORY ${PYTHON_LIB_OUTPUT_DIRECTORY}")
# SET(PYTHON_LIB_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}/python)
else()
SET(PYTHON_LIB_OUTPUT_DIRECTORY_BYPRODUCTS FALSE)
endif()
Expand Down
17 changes: 1 addition & 16 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,7 @@ if(BUILD_TESTS)
${TESTS_SRC}
${HELPERS_SRC}
)
# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../bin/${CMAKE_BUILD_TYPE}/)
endif()

# Add the executable and set required flags for the target
add_flamegpu_executable("${PROJECT_NAME}" "${ALL_SRC}" "${FLAMEGPU_ROOT}" "${PROJECT_BINARY_DIR}" FALSE)
# Add the tests directory to the include path,
Expand Down Expand Up @@ -142,14 +135,6 @@ if(BUILD_TESTS_DEV)
${TESTS_DEV_SRC}
${HELPERS_SRC}
)
# Define output location of binary files
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# If top level project
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/)
else()
# If called via add_subdirectory()
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../bin/${CMAKE_BUILD_TYPE}/)
endif()
# Add the executable and set required flags for the target
add_flamegpu_executable("${PROJECT_NAME}" "${ALL_SRC}" "${FLAMEGPU_ROOT}" "${PROJECT_BINARY_DIR}" FALSE)
# Add the tests directory to the include path,
Expand Down