Skip to content
Snippets Groups Projects
Unverified Commit a1f863e7 authored by Lars Bilke's avatar Lars Bilke Committed by GitHub
Browse files

Merge pull request #2597 from bilke/cmake-docs

Update CMake docs and bump minimum version
parents a580ee9a 7634956d
No related branches found
No related tags found
No related merge requests found
Showing
with 38 additions and 40 deletions
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Gocad T Surface files should always be converted to native line endings.
*.ts text
# Enable style checks on source files
*.h hooks.style=uncrustify
*.cpp hooks.style=uncrustify
......
......@@ -16,7 +16,7 @@ include_directories(
# Put moc files in a project folder
source_group("Moc Files" REGULAR_EXPRESSION "moc_.*")
file(GLOB UIS *.ui)
file(GLOB UIS CONFIGURE_DEPENDS *.ui)
source_group("UI Files" FILES ${UIS})
# Application icon
......
......@@ -100,7 +100,7 @@ source_group("Dialog Header Files" REGULAR_EXPRESSION "[.]*Dialog.h")
source_group("Dialog Source Files" REGULAR_EXPRESSION "[.]*Dialog.cpp")
source_group("Data Model Header Files" REGULAR_EXPRESSION "[.]*Item.h|[.]*Model.h|[.]*View.h")
source_group("Data Model Source Files" REGULAR_EXPRESSION "[.]*Item.cpp|[.]*Model.cpp|[.]*View.cpp")
file(GLOB UIS *.ui)
file(GLOB UIS CONFIGURE_DEPENDS *.ui)
source_group("UI Files" FILES ${UIS})
set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
......
......@@ -30,7 +30,7 @@ include_directories(
${GUI_SOURCE_DIR_REL}/DataView
)
file(GLOB_RECURSE UIS *.ui)
file(GLOB_RECURSE UIS CONFIGURE_DEPENDS *.ui)
source_group("UI Files" FILES ${UIS})
add_library(QtDiagramView
......
......@@ -22,7 +22,7 @@ include_directories(
${GUI_SOURCE_DIR_REL}/Base
)
file(GLOB_RECURSE UI_FILES *.ui)
file(GLOB_RECURSE UI_FILES CONFIGURE_DEPENDS *.ui)
source_group("UI Files" FILES ${UI_FILES})
add_library(QtStratView
......
......@@ -105,7 +105,7 @@ source_group("Filter Header Files" REGULAR_EXPRESSION "[.]*Filter.h")
source_group("Filter Source Files" REGULAR_EXPRESSION "[.]*Filter.cpp")
source_group("Source Header Files" REGULAR_EXPRESSION "[.]*Source.h")
source_group("Source Source Files" REGULAR_EXPRESSION "[.]*Source.cpp")
file(GLOB_RECURSE UIS *.ui)
file(GLOB_RECURSE UIS CONFIGURE_DEPENDS *.ui)
source_group("UI Files" FILES ${UIS})
set(SOURCE_DIR_REL ${CMAKE_CURRENT_SOURCE_DIR}/../../..)
......
......@@ -3,7 +3,7 @@
#####################
# Specify minimum CMake version
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.12)
# Set CMake policies
cmake_policy(SET CMP0011 NEW)
......
......@@ -14,9 +14,9 @@ macro(GET_SOURCE_FILES SOURCE_FILES)
endif()
# Get all files in the directory
file(GLOB GET_SOURCE_FILES_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.h)
file(GLOB GET_SOURCE_FILES_TEMPLATES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.tpp)
file(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${DIR}/*.cpp)
file(GLOB GET_SOURCE_FILES_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS ${DIR}/*.h)
file(GLOB GET_SOURCE_FILES_TEMPLATES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS ${DIR}/*.tpp)
file(GLOB GET_SOURCE_FILES_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} CONFIGURE_DEPENDS ${DIR}/*.cpp)
set(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_TEMPLATES} ${GET_SOURCE_FILES_SOURCES})
list(LENGTH ${SOURCE_FILES} NUM_FILES)
......@@ -77,4 +77,4 @@ function(add_autogen_include target)
target_include_directories(${target} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${target}_autogen/include)
endif()
endfunction()
\ No newline at end of file
endfunction()
......@@ -174,58 +174,60 @@ If you do not have rights to install a system package (e.g. on cluster systems)
:::
## Step: Install CMake
## Step: Install Python 3
::: {.win}
- Download the installer, at the [CMake download page](http://www.cmake.org/cmake/resources/software.html) choose the **Windows (Win32 Installer)**.
- Execute the installer, please check the **Add CMake to the system path for all users**-option
- [Download the Python 3 installer](https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64-webinstall.exe)
- Install with the following options
- Check *Add Python 3.X to PATH*
- *Customize installation*
- Make sure to have `pip` enabled (you may uncheck *Documentation*, *tcl/tk*, *Python test suite*)
- You may check *Install for all users*
- Check *Add Python to environment variables*!
:::
::: {.linux}
Install CMake with your favourite package manager (the two graphical user interfaces are optional):
Install Python 3 and pip:
```bash
$ sudo apt-get install cmake cmake-qt-gui cmake-curses-gui
sudo apt-get install python3 python3-pip
```
:::
::: {.mac}
Install CMake with Homebrew:
Install Python 3 with Homebrew:
```bash
$ brew install cmake
brew install python
```
:::
## Step: Install Python 3
## Step: Install CMake
::: {.win}
- [Download the Python 3 installer](https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64-webinstall.exe)
- Install with the following options
- Check *Add Python 3.X to PATH*
- *Customize installation*
- Make sure to have `pip` enabled (you may uncheck *Documentation*, *tcl/tk*, *Python test suite*)
- You may check *Install for all users*
- Check *Add Python to environment variables*!
- Download the installer, at the [CMake download page](http://www.cmake.org/cmake/resources/software.html) choose the **Windows (Win32 Installer)**.
- Execute the installer, please check the **Add CMake to the system path for all users**-option
:::
::: {.linux}
Install Python 3 and pip:
Install CMake with Pythons package manager `pip` (you may get a more recent version than using your systems package manager):
```bash
sudo apt-get install python3 python3-pip
$ pip3 install --user cmake
```
This installed `cmake` and `ccmake` to `.local/bin` in your home directory. Make sure to have this directory in your `PATH`!
:::
::: {.mac}
Install Python 3 with Homebrew:
Install CMake with Homebrew:
```bash
brew install python
$ brew install cmake
```
:::
......
......@@ -20,12 +20,6 @@ cmake . -DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES=ON
You should also have at least 8 GB of RAM and even this can be not enough when compiling on multiple cores (which is the default). To build on only one core run the following in your build-directory:
```
cmake --build . --config Release -- /m:1 /p:CL_MPCount=1
```
**OR** if you have [CMake >= 3.12](https://cmake.org/cmake/help/v3.12/manual/cmake.1.html#build-tool-mode) you can simply use `-j 1`:
```
cmake --build . --config Release -j 1
```
......@@ -34,8 +28,7 @@ If this still fails you can disable building of the failing processes, e.g.:
```
cmake . -DOGS_BUILD_PROCESS_HT=OFF
cmake --build . --config Release -- /m:1 /p:CL_MPCount=1
```
cmake --build . --config Release -j 1
## Cotire-related (pre-compiled headers)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment