diff --git a/.clang-format b/.clang-format index f317044..d4365e1 100644 --- a/.clang-format +++ b/.clang-format @@ -14,7 +14,7 @@ BreakConstructorInitializersBeforeComma: 'false' ColumnLimit: '80' ConstructorInitializerAllOnOneLineOrOnePerLine: 'true' Cpp11BracedListStyle: 'true' -IndentCaseLabels: 'true' +IndentCaseLabels: 'false' KeepEmptyLinesAtTheStartOfBlocks: 'false' Language: Cpp MaxEmptyLinesToKeep: '2' diff --git a/CMakeLists.txt b/CMakeLists.txt index 85b963d..2a93d0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()