Project setup
This commit is contained in:
14
cmake/compileCommands.cmake
Normal file
14
cmake/compileCommands.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
##### SETUP COMPILE COMMANDS #####
|
||||
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(CMAKE_EXPORT_COMPILE_COMMANDS on)
|
||||
endif()
|
||||
|
||||
if(EXISTS "${CMAKE_BINARY_DIR}/compile_commands.json")
|
||||
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
file(
|
||||
COPY "${CMAKE_BINARY_DIR}/compile_commands.json"
|
||||
DESTINATION "${CMAKE_BINARY_DIR}/../"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
10
cmake/platform.cmake
Normal file
10
cmake/platform.cmake
Normal file
@@ -0,0 +1,10 @@
|
||||
message("System name: ${CMAKE_HOST_SYSTEM_NAME}")
|
||||
if(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Windows")
|
||||
add_compile_definitions(PLATFORM_WINDOWS)
|
||||
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Linux")
|
||||
add_compile_definitions(PLATFORM_LINUX)
|
||||
elseif(${CMAKE_HOST_SYSTEM_NAME} STREQUAL "Darwin")
|
||||
add_compile_definitions(PLATFORM_MACOS)
|
||||
else()
|
||||
add_compile_definitions(PLATFORM_UNKNOWN)
|
||||
endif()
|
||||
Reference in New Issue
Block a user