Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mlz
libformfactor
Commits
57d28086
Commit
57d28086
authored
Feb 17, 2022
by
Wuttke, Joachim
Browse files
Decouple demo from top-level cmake
parent
ba4de9f8
Pipeline
#57471
passed with stage
in 53 seconds
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
57d28086
...
...
@@ -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
demo/CMakeLists.txt
View file @
57d28086
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
()
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment