added CMake file and split output line in 2 lines
This commit is contained in:
parent
71f9f726af
commit
a6bc7734fb
1 changed files with 23 additions and 0 deletions
23
CMakeLists.txt
Normal file
23
CMakeLists.txt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
cmake_minimum_required(VERSION 3.10.0)
|
||||||
|
set(CMAKE_BUILD_TYPE release CACHE STRING "build mode <debug|native|generic>")
|
||||||
|
cmake_policy(SET CMP0017 NEW)
|
||||||
|
project(StringArt)
|
||||||
|
if (CMAKE_BUILD_TYPE STREQUAL "debug")
|
||||||
|
message("building debug version")
|
||||||
|
add_definitions(-Wall -Wextra -O0 -g)
|
||||||
|
elseif (CMAKE_BUILD_TYPE STREQUAL "native")
|
||||||
|
message("building release version optimized for local CPU")
|
||||||
|
add_definitions(-Wall -Wextra -O3 -march=native -mtune=native)
|
||||||
|
else()
|
||||||
|
message("building generic release version")
|
||||||
|
add_definitions(-Wall -Wextra -O3)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_definitions(-std=c++20)
|
||||||
|
set (CMAKE_CXX_STANDARD 20)
|
||||||
|
set (CMAKE_C_STANDARD 20)
|
||||||
|
|
||||||
|
find_package(ImageMagick COMPONENTS Magick++)
|
||||||
|
|
||||||
|
add_executable(stringart main.cpp)
|
||||||
|
target_link_libraries(stringart ImageMagick::Magick++)
|
Loading…
Add table
Reference in a new issue