Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CMake docs and bump minimum version #2597

Merged
merged 6 commits into from
Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 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
Expand Down
2 changes: 1 addition & 1 deletion Applications/DataExplorer/DataExplorer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Applications/DataExplorer/DataView/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/../../..)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Applications/DataExplorer/VtkVis/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}/../../..)
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 4 additions & 4 deletions scripts/cmake/Functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -77,4 +77,4 @@ function(add_autogen_include target)
target_include_directories(${target} PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/${target}_autogen/include)
endif()
endfunction()
endfunction()
46 changes: 24 additions & 22 deletions web/content/docs/devguide/getting-started/prerequisites.pandoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
:::

Expand Down
9 changes: 1 addition & 8 deletions web/content/docs/devguide/troubleshooting/build.pandoc
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
Expand All @@ -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)

Expand Down