Commit 57d28086 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Decouple demo from top-level cmake

parent ba4de9f8
Pipeline #57471 passed with stage
in 53 seconds
......@@ -14,3 +14,14 @@ make
ctest
make install
```
Usage is demonstrated in directory demo/. To build and run example
code that prints q vs |F(q)| for some sequences of q vectors, do
```
cd demo
mkdir build
cd build
cmake ..
make
octahedron
```
\ No newline at end of file
cmake_minimum_required(VERSION 3.15 FATAL_ERROR)
project(demo_using_formfactor VERSION 0.1.2 LANGUAGES CXX)
## Compiler settings.
option(WERROR "Treat warnings as errors" OFF)
set(CMAKE_CXX_STANDARD 17)
if(WIN32)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
message(STATUS "compiling for Windows")
else()
option(PEDANTIC "Compile with pedantic warnings" ON)
if(PEDANTIC)
add_compile_options(-pedantic -Wall)
endif()
endif()
add_compile_options(-O2)
if(WERROR)
add_compile_options(-Werror)
endif()
## Dependencies
find_package(LibHeinz REQUIRED CONFIG)
find_package(formfactor REQUIRED CONFIG)
## Source
set(demos
octahedron
)
## Configure executable
foreach(app ${demos})
add_executable(${app} ${app}.cpp)
# target_include_directories(${app} PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(${app} formfactor)
endforeach()
Supports Markdown
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