Skip to content

Commit

Permalink
[#148]: Try using target_compile_options for c++ standard
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobDomagala committed Oct 27, 2023
1 parent d152750 commit 9e7ac1d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ add_executable(${MODULE_NAME} ${HEADERS} ${SOURCES})
target_include_directories(${MODULE_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/gui")

target_link_libraries (${MODULE_NAME} Engine)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_23)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_20)
4 changes: 2 additions & 2 deletions engine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ find_package(Vulkan REQUIRED)

target_link_libraries_system(${MODULE_NAME} PUBLIC stb_image CONAN_PKG::fmt CONAN_PKG::glfw CONAN_PKG::imgui CONAN_PKG::glm CONAN_PKG::nlohmann_json)
target_link_libraries(${MODULE_NAME} PUBLIC project_warnings project_options Vulkan::Vulkan)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_23)

target_compile_features(${MODULE_NAME} PRIVATE cxx_std_20)
target_compile_options(${MODULE_NAME} PUBLIC "-std=c++20")
if(WIN32)
target_compile_options(${MODULE_NAME} INTERFACE -DVK_USE_PLATFORM_WIN32_KHR)
endif()
Expand Down
2 changes: 1 addition & 1 deletion game/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ file(GLOB SOURCES "*.cpp")
add_executable(${MODULE_NAME} ${HEADERS} ${SOURCES})
target_include_directories(${MODULE_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
target_link_libraries (${MODULE_NAME} Engine)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_23)
target_compile_features(${MODULE_NAME} PRIVATE cxx_std_20)

0 comments on commit 9e7ac1d

Please sign in to comment.