Skip to content

Commit 3226a38

Browse files
committed
Merge branch 'feature/cmakelists' into develop
2 parents f2b0ed7 + e49f382 commit 3226a38

File tree

11 files changed

+45
-46
lines changed

11 files changed

+45
-46
lines changed

coding-test-cpp-practice/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
cmake_minimum_required(VERSION 3.16)
22

3-
project (
3+
project(
44
"coding-test-cpp-practice"
55
VERSION 1.0
6-
DESCRIPTION
7-
"Coding test practice for Programmers problems"
6+
DESCRIPTION "Coding test practice for Programmers problems"
87
LANGUAGES CXX
98
)
109

1110
# Enable Hot Reload for MSVC compilers if supported.
1211
if (POLICY CMP0141)
13-
cmake_policy(SET CMP0141 NEW)
14-
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
15-
endif()
12+
cmake_policy(SET CMP0141 NEW)
13+
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<AND:$<C_COMPILER_ID:MSVC>,$<CXX_COMPILER_ID:MSVC>>,$<$<CONFIG:Debug,RelWithDebInfo>:EditAndContinue>,$<$<CONFIG:Debug,RelWithDebInfo>:ProgramDatabase>>")
14+
endif ()
1615

1716
set(CMAKE_CXX_STANDARD 17)
1817
set(CMAKE_CXX_STANDARD_REQUIRED ON)

coding-test-cpp-practice/src/problem12904/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem12939/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem132265/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem154538/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem42883/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem43105/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem43163/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem43164/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

coding-test-cpp-practice/src/problem64063/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
enable_testing()
22
find_package(GTest REQUIRED)
33

4-
if(WIN32)
4+
if (WIN32)
55
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
6-
endif(WIN32)
6+
endif (WIN32)
77

88
macro(add_library_target target)
99
add_library(${target} STATIC "${target}.cpp")
@@ -15,11 +15,11 @@ macro(add_target_test target)
1515
string(REPLACE "_test" "" target_name ${target})
1616
add_executable(${target} "${target}.cpp" "${target_name}.cpp")
1717
target_link_libraries(${target} PRIVATE GTest::gtest GTest::gtest_main ${ARGN})
18-
if(MSVC)
18+
if (MSVC)
1919
### Edit and Continue for CMake projects
2020
target_compile_options(${target} PUBLIC "/Zi")
2121
target_link_options(${target} PUBLIC "/INCREMENTAL")
22-
endif()
22+
endif ()
2323
gtest_discover_tests(${target})
2424
endmacro()
2525

0 commit comments

Comments
 (0)