Currently moving from Gitlab to Gitea at https://labs.phundrak.com. Some features may not work anymore on this Gitlab instance.

better CMakeLists.txt and clang-format

parent 801e74d7
......@@ -14,7 +14,7 @@ BreakConstructorInitializersBeforeComma: 'false'
ColumnLimit: '80'
ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'
Cpp11BracedListStyle: 'true'
IndentCaseLabels: 'true'
IndentCaseLabels: 'false'
KeepEmptyLinesAtTheStartOfBlocks: 'false'
Language: Cpp
MaxEmptyLinesToKeep: '2'
......
......@@ -6,6 +6,8 @@ project("GeneticImages"
HOMEPAGE_URL "https://labs.phundrak.fr/phundrak/genetic-images"
LANGUAGES CXX)
set(CMAKE_CXX_COMPILER /usr/bin/clang++)
file(GLOB SRC_FILES "src/*.cc")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
......@@ -15,9 +17,16 @@ include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
enable_cxx_compiler_flag_if_supported("-Wall")
enable_cxx_compiler_flag_if_supported("-Wextra")
enable_cxx_compiler_flag_if_supported("-Wshadow")
enable_cxx_compiler_flag_if_supported("-Wpedantic")
enable_cxx_compiler_flag_if_supported("-pedantic")
enable_cxx_compiler_flag_if_supported("-O3")
enable_cxx_compiler_flag_if_supported("-flto")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
enable_cxx_compiler_flag_if_supported("-g")
else()
enable_cxx_compiler_flag_if_supported("-O3")
enable_cxx_compiler_flag_if_supported("-flto")
endif()
# include_directories(<PUBLIC HEADER DIRECTORIES>)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment