Cmake For Mac
Once the binary is installed, run it on CMake as you would any other project. Typically this means selecting CMake as the Source directory and then selecting a binary directory for the resulting executables. Linux, macOS, UNIX. There are pre-compiled binaries available on the Download page for some UNIX platforms. One may alternatively download and build CMake from source.
I would like check whether I am in Mac OS X or not, and have the following code
It failed on non-OSX system with error message
If I replace ${APPLE}
with APPLE
, the error went away. But I am a little puzzled by this. When should we refer to a variable with ${VAR}
and when should we not to?
Thanks in advance.
To put it shortly: Everything inside the if parentheses is evaluated as an expression, this is the semantic of the if
keyword. So if you put APPLE
there, it gets evaluated as a variable name and yields the correct result.
Now if you put ${APPLE}
there, ${}
will evaluate its contents beforeif
evaluates the expression. Therefore, it's the same as if you'd written
(in the case that the variable APPLE
isn't set, which is the case on non-OSX systems). This is invalid syntax and yields the error you get. You should write:
Quoting from the CMake Documentation:
The if command was written very early in CMake’s history, predating the ${} variable evaluation syntax, and for convenience evaluates variables named by its arguments as shown in the above signatures. Note that normal variable evaluation with ${} applies before the if command even receives the arguments. Therefore code like:
appears to the if command as:
and is evaluated according to the if() case documented above. The result is OFF which is false. However, if we remove the ${} from the example then the command sees:
which is true because var2 is defined to “var1” which is not a false constant.
How to avoid name clashes in cmake subprojects?
CMake doesn't allow duplicate target names. The rationale is provided in the docs for policy CMP0002: Unique names may be referenced unambiguously both in CMake code and on make tool command lines. Logical names are used by Xcode and VS IDE generators to produce meaningful project names for the targets..
What is the name of CMake's default build target?
c++,c,build,cmake
The default build target does not exist as a CMake target at CMake configure time. It is only exists in the generated build system. Therefore it is not possible to have the default target depend on a custom target.
cmake - Is it possible to link executable to shared library with relative path at runtime?
c++,cmake,shared-libraries
When you launch ldd to check your app shared library dependencies, it always prints absolute paths. But if you are using the -rpath oprtion together with the $ORIGIN variable, everything will work as you expect. You can move the executable and the shared library, remove the original build directory and..
Do you only need to build the googletest library once?
c++,cmake,make,static-libraries,googletest
You should keep in mind that make will not rebuild gtest if you don't change anything in gtest source code. Below is my approach to the usage of cmake and gtest for unit testing. You can add gtest source code by adding it as subdirectory in the root CMakeLists.txt file..
Configuring CMake to re-compile source when unit testing
unit-testing,cmake
First I'd recommend an out-of-source-build like this: ├── build │ ├── src │ └── test └── code ├── CMakeLists.txt ├── src │ ├── CMakeLists.txt │ ├── table.c │ └── table.h └── test └── CMakeLists.txt └── test_table.c The top-level CMakeLists.txt in code would look like this: project(example) set(BUILD_TESTS FALSE CACHE BOOL..
Building vtk with QT5 windows 8
windows,cmake,qt5,vtk
Did you do step 3 and 4 here? : Combining Qt 5.4.1 with vtk 6.2.0 (using CMake GUI 3.2.1) on windows I'm guessing you didn't change VK_QT_VERSION to 5..
Cannot link to sublibrary/internal library/embedded library with CMake's Visual Studio generator
c++,visual-studio,visual-c++,cmake
From your other question, I gather the project is this one. The cause of the problem is that you're building boost_http as a shared library, but you don't export any functions or classes from it. You need to decorate the public API functions/classes with __declspec(dllexport) to make these available to..
How to deal with libraries like Boost when cross compiling for arm?
ubuntu,cmake,g++,cross-compiling,beagleboneblack
Yes, you need the boost libraries which are not header only built for ARM. This SO question covers that: cross compile Boost 1.57.0 on ubuntu for arm To make things like find_package work for cross compilation you should set CMAKE_FIND_ROOT_PATH. Suppose you set CMAKE_FIND_ROOT_PATH to /opt/beagleboard. CMake will then look..
Cmake and Qt5 linking error
c++,qt,cmake,qt5
I think you forget to append moc and resources to your executable use qt5_wrap_cpp() for mocs use qt5_add_resources() for resources. Then you must append vars to add_executable check out this link. ..
how to make sure that cmake codes will run after subdirs
c++,cmake
Do not use deprecated command subdirs. Everything works when it is replaced by add_subdirectory
CMake link shared library
The first parameter to find_library is a variable. So you should use the value of that created and filled out variable in the target_link_libraries: target_link_libraries( application ${abc} ${OpenCV_LIBS}) ..
Why does CMake FILE(READ) ignore commas in my file?
I found out what the problem is : CMake considers my input as a list, in which elements are separated by a comma (;). To avoid that, we have to add quotes to the variable, like this '${MY_VAR}' : message('${CONTENT}') ..
How do I make cmake output fortran .mod files into a mod dir?
cmake,fortran
See target's property Fortran_MODULE_DIRECTORY or CMAKE_Fortran_MODULE_DIRECTORY.
Building libobjc2 with CMake + Clang + MinGW on Linux
cmake,clang,cross-compiling,mingw-w64,libobjc2
Okay, so I figured that I would need to add -lobjc to the CMAKE_CXX_FLAGS, but it never occured to me to add a linker search path for the library. Running the following before make solves my problem: cmake . -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=x86_64 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS=$CLANG_WINDOWS_XFLAGS -DCMAKE_CXX_FLAGS='$CLANG_WINDOWS_XFLAGS -L`pwd` -lobjc' -DCMAKE_INSTALL_PREFIX=/opt/cross/windows/gnustep ..
make error during building webkitgtk
linux,makefile,cmake,make
as you see, in Edit1, you (make) try to run JavaScriptCore-4.0.gir instead of compile it with g-ir-compiler; I tried on my pc and my command is: cd /home/davide/src/webkitgtk-2.8.3/build/Source/JavaScriptCore && /usr/bin/g-ir-compiler /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.gir -o /home/davide/src/webkitgtk-2.8.3/build/JavaScriptCore-4.0.typelib as a workaround, you cand edit: build/Source/JavaScriptCore/CMakeFiles/JavascriptCore-4-gir.dir/build here's the lines on my file (the last..
CMAKE, SDL2 and OPENGL: Program binary is too big
c++,cmake,shared-libraries,static-libraries,sdl-2
Building with cmake . uses the same CMAKE_BUILD_TYPE as the most recent build in that directory. Use cmake -DCMAKE_BUILD_TYPE=Release . to build in release mode. If you built debug first then release, using the procedure you described, it would just rebuild your debug binary.
c++: Undefined reference to ERROR
c++,cmake,ros,cpd
undefined reference is a linker error, not a compiler error. Your use of include_directories() is OK, but you forgot to also add ${CPD_LIBRARIES} (1)(2) to the target_link_libraries() of your target(s). (1): Just guessing that FindCPD.cmake 'works' the same way as all the other FindXyz.cmake modules. Never worked with CPD myself..
How do I list the defined make targets from the command line?
For Makefile generator build environments you could use cmake.exe --build . --target help And there is the graphical output solution (example found here): cmake.exe . --graphviz=test.graph dotty test.graph See also Generating Dependency Graphs with CMake and CMake Graphviz Output Cleaner. If you don't have dotty installed, you can still make..
cmake disable optimization with /Od
You need to modify CMAKE_CXX_FLAGS_RELEASE, for example: STRING(REPLACE '-O2' '-Od' CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE}) ..
How to ask Cmake output googletest detailed result
c++,cmake,googletest
I figured out I can do this: make test ARGS=-V ..
Cmake - not creating the dynamic links
cmake,make
ldd reports what the run-time linker can find. If you see libba.so in the output it means the binary is linked to the library. The 'not found' means the run-time linker can't find that library (i.e. you don't have it installed in a normal system location). So you can either..
How do I create a project in Visual Studio to use OpenMesh after I've built using CMake?
c++,visual-studio,cmake
Open the file using visual studio (By double clicking on it.) Once visual studio opens find the Build tab at the top of the window. Hit the build solution button and wait for the compiler to finish. To change the build configuration find the drop down menu beside the..
How to set target library dynamically in cmake?
c++,boost,cmake
The correct library name should already be provided through FindBoost. Just use it like this: find_package(Boost COMPONENTS thread) include_directories(${Boost_INCLUDE_DIRS}) add_executable(foo foo.cpp) target_link_libraries(foo ${Boost_LIBRARIES}) ..
How to use cmakedefine preprocessor directive properly?
c++,cmake
You should include not 'headerconfig.h.in', but 'headerconfig.h', and add appropriate configure_file call in your cmake. The idea is that cmake process headerconfig.h.in and generate headerconfig.h, replace '#cmakedefine' with real values, and it uses headerconfig.h.in as template.
Include QtMultimedia (or whatever is needed for QSound) module using CMake
qt,cmake
Converting my comment into this answer to close this question: CMake needs to know where the Qt5 specific files are located. Therefore you should add ~/sw/Qt/Qt_5_4/5.4/gcc_64/ either to the environment variable $CMAKE_PREFIX_PATH or set it using set(CMAKE_PREFIX_PATH '~/sw/Qt/Qt_5_4/5.4/gcc_64/') Then CMake will be able to perform find_package(Qt5Multimedia)..
Error : Cmake can't generate openCV
opencv,cmake,codeblocks
just do the obvious thing, and specify your c, c++ compiler and the make tool in question: cmake -G 'MinGW Makefiles' -DCMAKE_MAKE_PROGRAM='D:/Programme/MinGW/bin/mingw32-make.exe' -DCMAKE_CXX_COMPILER='D:/Programme/MinGW/bin/mingw32-g++.exe' -DCMAKE_C_COMPILER='D:/Programme/MinGW/bin/mingw32-gcc.exe' -DWITH_IPP=OFF . (ofc. your path will vary, but i hope, you get the idea) ((if you read between the lines - the opencv devs seem to..
CMake and CTest: automatically run test's dependencies
c++,c,testing,cmake,ctest
There's no built-in way of doing this as far as I know. The best way I can think of to achieve your goal is to use the LABELS property on the tests. You can retrieve the list of dependencies using get_property or get_test_property and apply the same label to testX..
Linker error while building from source code
c++,cmake,linuxmint
Try passing -DCMAKE_EXE_LINKER_FLAGS=-ldl to the CMake executable. To change the CMake build scripts, add something like: target_link_libraries(target_name dl) where target_name is basically the executable name without any extensions (e.g. .exe). EDIT: Actually, I just reread you question, and I'm putting this in the wrong place. You really want: target_link_libraries(Basic dl)..
How to change the name of the output binary to not be a.out with CMake?
Here's a simple CMakeLists.txt cmake_minimum_required(VERSION 2.6 FATAL_ERROR) project(demo) add_executable(hello hello.cpp) This CMakeLists.txt compiles a hello.cpp file to an executable named hello. You can name the executable anything by using the add_executable statement. add_executable(<executable-name> <source1> <source2> ..) ..
Link target to libraries
makefile,cmake,mingw,cmake-gui
CMakeLists.txt should call target_link_libraries(cryptopp ws2_32) after command ADD_LIBRARY to resolve undefined references..
Cmake errors: The CXX Compiler identification is unknown, The C compiler identification is unknown
c++,opencv,cmake,arm,cmake-gui
From the output it appears that cmake was able to find your cross compiler but as the output says it can't compile a simple program. I would start with creating Hello World in C++ and trying to compile that with your cross compiler. If that doesn't work that is your..
Install a CMake macro script from within a python package install script (using setup.py)
python,cmake,setuptools,distutils,setup.py
It took me a while to understand your question. If I understand correctly, what you are trying to do is provide the IodSymbolize.cmake in the standard installation location of cmake so that other users/projects who rely on your software(symbolizer) can use it in their build process. I think you are..
How to write CMakeFile when the code use C++, but called python
python,c++,linux,makefile,cmake
This should be sufficient: find_package(PythonLibs REQUIRED) add_executable(outxx main.cpp pu.cpp) target_link_libraries(outxx ${PYTHON_LIBRARIES}) target_include_directories(outxx PUBLIC ${PYTHON_INCLUDE_DIRS}) And if we were to try and run this: [2:28pm][[email protected] blah] cmake . -- The C compiler identification is AppleClang 6.1.0.6020053 -- The CXX compiler identification is AppleClang 6.1.0.6020053 -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc..
CMake simple MVC structure
c++,model-view-controller,cmake
It looks pretty normal structure to me. In fact I use the same one in my projects. In the root CMake file you will put: include(Src/Model/CMakelists.txt) and CMakelists.txt might look like this: set(MODEL_HEADERS src/Model/model.hpp) set(MODEL_SOURCES src/Model/model.cpp ${MODEL_HEADERS}) list(APPEND ALL_SOURCES ${MODEL_SOURCES}) source_group('Model' FILES ${MODEL_SOURCES}) Where ALL_SOURCES is the variable from the..
Unable to build GLFW with CMake errors
c,cmake,glfw
One of the error outputs was Looking for glXGetProcAddressEXT - not found, and the log files indicated that there was a linking error with libGL. I then tried running apt-get install glfw to print out the list of dependencies. Even though it was an older version in apt-get, it still..
CMake to find path to a file which its name contains a certain string
OK, after a lot of searching and getting exhausted I finally found a solution. I just need to use the following command: file(GLOB files 'Mylib*') Which will create a list named files and adds each file that its name matches the pattern 'Mylib*' to it. I really don't know why..
Adding headers to Cmake
compilation,cmake
I see some problems in your CMake file. First of all, your *.h files musn't be given in the add_executable command. Try something like that : cmake_minimum_required(VERSION 2.8) project(RotateActor) option(INCLUDE_SERVER 'Use the server implementation' ON) # Manage your libraries before your sources find_package(VTK REQUIRED) include(${VTK_USE_FILE}) # add the Server library..
Templated linkage does not work on -O2, but does on -O0
c++,cmake
My issue is solved and dyp was closest with his/her comment. The magic word is 'explicit template instanciation' and may be found here: http://www.cplusplus.com/forum/articles/14272/ I did NOT clutter my header files with definitions. Nor did I add code like #include 'some.cpp' into the header, which in my opinion amounts to..
How to install shared library and include files manually in linux?
linux,opencv,cmake,raspberry-pi
As a work around, I created tbb.pc file to /usr/lib/pkgconfig/. Here is a sample of that file. https://github.com/openembedded/meta-oe/blob/master/meta-oe/recipes-support/tbb/tbb/tbb.pc Change prefix, libdir and include dir path according to your own tbb path and you're good to go. Hope it helps..
Cannot link Boost to CMake-based project on VS2015 RC
c++,visual-studio,visual-c++,boost,cmake
The problem is that you define BOOST_TEST_DYN_LINK which according to the Boost.Test docs is used when consuming the dynamically-built Boost.Test lib. Since you have built the static version, you should remove this definition..
Add LLVM to project using cmake
c++,cmake,llvm,llvm-c++-api,llvm-3.0
As indicated by Marco A. in the comments, the problem were missing libraries. This link helped resolve the issue, and everything seems to be working normally now. http://stackoverflow.com/a/25783251/1938163 Thank you..
How can I configure CMake generated Eclipse project's Build Command and Project Paths?
cmake,eclipse-cdt
I found a solution to build command issue. When you run cmake to generate the eclipse project include the additional argument:-DCMAKE_ECLIPSE_NINJA_ARGUMENTS=-j100. I haven't confirmed but I believe a similar command is required for eclipse make projects -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j100. Unfortunately this feature is poorly documented and I have not found a solution..
Converting Makefiles to CMAKEList (compilation successful but the program behave differently) [closed]
c++,makefile,cmake
From a quick look, your compile flags are not the same. For example, in the Makefile you have CPPFLAGS= -O3 -Wall $(INCDIR) But, in CMakeLists.txt you have set(CMAKE_CXX_FLAGS ' -Wall -I./include -I/usr/local/include ') which is missing the '-O3' flag. Make sure the flags are identical. The same goes for the..
Glew undefined reference linking error
c++,cmake,glew
Fixed it. Somewhere along the lines I had got glu32 which glew was using instead of the windows ones I compiled. Added a reference to glew32 and it worked fine..
Two different CMake difinitions
This is not really related to CMake but more to the C/++ compiler. In the code the difference is the same between : #define MY_DEFINITION and #define MY_DEFINITION 1 Actually there's not need to define a value for a C/++ macro if the only thing you want is to know..
CMake creating shared and static library with different defines
You can set compiler flags per-target by using the target_compile_definitions command. For example: target_compile_definitions(support PRIVATE MY_SHARED_DEFINITION) target_compile_definitions(support_s PRIVATE MY_STATIC_DEFINITION) As for adding a postfix to your debug libraries, you can achieve this by setting the CMake variable CMAKE_DEBUG_POSTFIX: set(CMAKE_DEBUG_POSTFIX _d) This will cause all non-executable targets to have _d appended..
Having issues with using libraries and CMake
c++,cmake
The error message is pretty clear: There are two targets with the same name which is not possible in CMake. add_executable(Majick ${SOURCE_FILES}) .. add_library(Majick STATIC) I guess the second target just needs to be deleted..
cmake target_link_libraries() launching error Cannot specify link libraries for target “debug”
c++,api,cmake,sfml
EXECUTABLE_NAME is not set in target_link_libraries command, so in a debug build target_link_libraries(${EXECUTABLE_NAME} ${SFML_LIBRARIES}) is expanded to target_link_libraries(debug path/to/debug/library optimized path/to/release/library .. ) The first argument is treated as target name so you see the error Error:Cannot specify link libraries for target 'debug' which is not built by this project..
Valgrind changes working directory with CTest in KDevelop
c++,cmake,valgrind,ctest
It seems to be a problem with KDevelop. Running the test from the console did not change the working directory. I've created a bug report: https://bugs.kde.org/show_bug.cgi?id=349378..
Protobuf cannot be linked on ubuntu
c++,ubuntu,linker,cmake,protocol-buffers
As @frymode pointet out in his comment, linkage to NewGeneratedMessageReflection means that the compiler generated code that uses Protobuf version 3 (as I used that version in my .proto files). However, the library files installed from the ubuntu package pulled version 2 onto my system, that's why the methods could..
Overview¶
In this page, we discuss instructions for how to compile PSCF from sourceusing the cmake build system, on either Mac OS X or linux operating systems.It is also possible to compile the code using the unix make utility alone,using a makefile that is provided with the source code. Compilation usingmake alone is described on a separate page on Compiling from source, using make.The advantage of using cmake is that cmake can generally find the paths tothe Lapack and FFTW libraries upon which PSCF depends, whereas you are morelikely to need to figure out the locations of these libraries yourself ifyou use make.
Compiling with cmake involves the following steps:
Each of these steps is explained in greater detail below.
Only the first step, installing external dependencies, is substantiallydifferent for different operating systems. We thus give separateinstructions for Mac OS and different Linux distributions for this partof the process.
To obtain a copy of the source code from the github repository in whichit is stored, one can either:
- Download a zip file
- Use the git version control software to clone the repository
We recommend using git to clone the repository, since this makes itsimple to update the code later, but both procedures are describedbelow.
Installing Dependencies¶
The following software packages must be installed before using cmaketo compile PSCF, if you plan on using git to obtain the source code:
- git (in order to clone the source code)
- cmake (to build a makefile)
- a Fortran 90 compiler (to compile the source code)
- Python (used by the build system)
- LAPACK linear algebra library
- FFTW version 3.x fast fourier transform library
You do not need to install git if you plan to simply download a copyof the source code rather than using git. On a Mac, some of the abovepackages come bundled with the XCode development environment, whichmust in any case be installed before you try to compile softwarefrom source on Mac OS X. Python is included with all common linuxdistributions, and is also bundled with recent versions of Mac OS X.
In what follows, we will assume that you plan to use free gfortranFortran compiler, which is part of the Gnu Compiler Collection (gcc)suite of compilers, and give instructions for installing thisfortran compiler. This fortran compiler does not come bundled withany of the operating systems discussed here.
Mac OS X¶
Installing XCode
To create an environment in which you can compile from source on OSX, youwill generally first need to install the apple XCode development environment.XCode is available gratis from the Apple app store. It is a large packagethat can take a long time to install, so do this with a good internetconnection. The XCode package contains git, so it is not necessary toinstall git separately on a Mac. The Mac OS X operating system also appearsto come with a version of LAPACK, and the BLAS library upon which itdepends. Neither the operating system nor XCode provide cmake, gfortran,or FFTW.
Checking for Python
A Python interpreter is included in recent versions of Mac OS X. To checkif Python is already installed, enter the command:
or:
from a unix terminal window. If the system responds to either of thesecommands by writing a location for a python executable file to theterminal, then Python is already installed. If nothing is written tothe terminal in response, then either Python is not installed or theoperating system doesn’t know where to find it. Instructions forinstalling python, if necessary, are given below.
Package Managers: HomeBrew vs. MacPorts
The remaining dependencies (cmake, gfortran and FFTW) can be most easilyinstalled using either the MacPorts or Homebrew package manager systems.These are both systems for managing open-source unix software on the unixsubsystem of the Mac OSX. The choice between these package managers isup to you, but you should avoid using both on the same machine. If eitherHomebrew or MacPorts is already installed and in use on your Mac, use theexisting system, and do not install the other, because they do not playwell together. If neither Homebrew or MacPorts is installed, we have aslight preference for Homebrew, which we find makes it slightly easier toinstall the dependencies required by PSCF. We have succeeded in buildingPSCF using both of these package managers on machines that are runningthe latest version of Mac OS X (El Capitan, X 10.11), using differentpackage managers on different machines. Instructions for both packagemanagers are given separately below.
Installing dependencies via Homebrew
To install from a command line terminal using homebrew:
If you need to install python (which is unlikely), enter:
Installing dependencies via Macports
After MacPorts is installed, to install the required dependenciesusing the most recent version of the gnu compiler collection (gcc),which is gcc 5.X at the time of writing, enter:
If python is required, enter:
Note that MacPorts (unlike homebrew) requires you to use “sudo”to execute installation with superuser/administrator privileges,and so will ask for a password after each of the above commands.
The gcc5 MacPorts package installs the gfortran Fortran 90 compilerexecutable at /opt/local/bin/gfortran-mp-5 . Versions compiled withearlier versions of gcc (e.g., 4.9) seem to be placed in the samedirectory with a different numerical suffix, e.g., gfortran-mp-49.CMake appears to be unable to find this compiler executable withouthelp. To remedy this, you should set the FC environment variable(which indicates the path to a Fortran compiler) to point to theabsolute path to the gfortran executable before attempting tocompile, by entering, for example:
If expect to compile this and other fortran programs repeatedly,you may want to put this in your .profile or .bashrc bashconfiguration file.
Ubuntu Linux¶
Use the Ubuntu software manager or the command line apt-get utilityto install the following packages:
To use apt-get from the command line, enter:
Fedora Linux¶
Instructions for Fedora are similar to those for Ubuntu, except that oneshould use the native yum command line package manager or the Fedoragraphical software manager to install dependencies. The required Fedorapackages are:
To install these packages from the command line, enter:
For Fedora 22 and later, you may use the command “dnf” rather than“yum” to use the an updated version of the yum package manager. Todo so, simply replace “yum” by “dnf” in each of the above commands.
Using Linux Modules¶
Many large multi-user computer clusters use linux modules to allow usersto load software packages that they require, chosen from among a list ofavailable modules. The following instructions describe how to load therequired modules to build PSCF in a user directory on the MinnesotaSupercomputer Institute (MSI) Mesabi computer, using linux modules andthe Intel compiler. Similar instructions should apply to other largeclusters that use linux modules.
To load the required modules on Mesabi at MSI, and also choose the Intelcompiler, enter:
The remaining instruction for how to obtain and compile the source codeare generally similar to thos given for OSX or Linux. The only differenceis that, to use the Intel compiler, one must tell cmake to use the Intelcompiler by adding the option “-DUSE_INTEL=1” to the cmake command. Therequired command is thus:
More generally, to use the Intel fortran compiler on any operating system(when available), use the “-D” option to define USE_INTEL=1 to instructcmake search for an Intel compiler rather than using gnu fortran.
Obtaining the Source Code¶
We assume in what follows that you will use cmake to perform an“out-of-source” build, in which all of the files generated duringcompilation are placed in a directory tree outside the source code tree.To begin, we recommend that you create a directory named pscf/ somewherein your user directory tree, and then create a subdirectory of pscf/named named cmake/. To do this, enter:
The directory named pscf/cmake/ will be used as the build directory.The source code will be placed in another subdirectory of pscf/, whichwe will call git/ to indicate that it contains the contents of the gitrepository that contains the source code.
The source code for pscf is stored in a repository on the github.comserver, at:
A copy of the source code may be obtained either, by:
- Downloading a zip file, or
- Using git to clone the source code.
To download a zip file:
Point your browser at the pscf github repository.
Click the “Download ZIP” button near the upper right cornerof that web page. On Mac OS X and most linux systems, this willcreate a subdirectory named pscf-master within your Downloadsfolder or directory.
Move the pscf-master/ directory into the pscf/ directory that youjust created.
Rename the pscf/pscf-master/ directory as git/, by changing directoryto pscf and then entering:
To use git to clone the repository, after git is installed on your machine:
Change directory to the pscf directory.
Clone the repository, by entering:
BS 1377 Part 3 (Chemical & Electro-Chemical Tests).pdf - Free download as PDF File. Pdf Free Download Here BS 1377-2:1990 M#4.5 SOIL SOIL/Lab &5 - Pioneer Laboratory Co. BS 1377 Part 3 Clause 7.2. AGGREGATE: S. Bs 1377 part 9 pdf. What is this standard about? This is Part 3 of a standard on how to test soil samples and ground water for the presence of chemicals that might. BS1377:Part 5:1990. BS1377:Part 3:1990. NPRA 014 test 14.445. BS1377:Part 5:1990. PH Value (pH meter). BS1377:Part 3:1990. Overview BS 1377-3:1990 Methods of test for soils for civil engineering purposes. Chemical and electro-chemical tests: This Part of BS 1377 describes test methods for determining the amount of chemical substances, including organic matter, in samples of soil and ground water for.
This should create a subdirectory of pscf/ that is also named pscf/.To avoid confusion, we recommend that you change the subdirectoryname to pscf/git/, exactly as described above for the case of adirectory created from a zip file.
At this point, by either method, you should have pscf/ directory structure:
in which the cmake/ subdirectory is empty and the git/ subdirectory containsthe contents of github repository, including the source code.
Compiling and Installing¶
Choose an Install Directory
After installing all dependencies and obtaining the source code, you areready to compile PSCF. Before compiling the code, you need to decide whereyou would like to install the pscf executable, along with several otherexecutable scripts and python files. The build system created by cmake willinstall these files in subdirectories of a directory that we will refer toas the install directory. You can specify the location of the installdirectory by an option on the command line of the “cmake” command, asdiscussed in more detail below.
After installation, the install directory (denoted by install/ below)will contain the following three subdirectories:
After installation, the bin/ subdirectory will contain the pscf executableand other executable files, the lib/ subdirectory will contain pythonmodules and matlab files and the share/ directory will contain severaltext files containing information about the program.
We recommend that you choose one of the three following three possiblelocations for the install directory for pscf:
- The pscf/ directory that contains the cmake/ and git/ subdirectories.
- A standard location for installing software within your user directory.
- The system-wide /usr/local directory.
If you choose to install software within a standard location within youruser directory, one common choice for this is a hidden directory of yourhome directory named “.local” .
One advantage of the first two options listed above is that both installall executable files within your user directory, and thus do not requireadminstrative privileges. This also makes it somewhat easier for you tosee what files you have installed (since these files are not placed indirectories containing many files associated with other applications),and remove them if you ever desire. The further administrative advantageof the first option, of installing executables within the pscf/ directorythat also contains the source code, is that it keeps all of the filesassociated with PSCF in a single directory tree within the user directory.
Buy Mata Hari Download: Read 11 Everything Else Reviews - Amazon.com. Mata Hari Free Download PC. Games View. Europe, at the beginning of the 20th century: the beautiful dancer Mata Hari has collective. About This Game. TRUST NO ONE BUT YOURSELF as you adventure into the dark world of espionage amidst the volatile atmosphere of. In 1988, Loriciels publishes Mata Hari on Amstrad CPC. Also published on Atari ST, this action game is abandonware and is set in an arcade, shooter, spy. Mata hari game free download.
The main disadvantage of both the first and second options is that,because both install files within your user directory, they will bothrequire you to modify some operating system environment variables inorder to allow the operating system to find the PSCF executable and toallow the python intepreter to find python modules that are providedto faciliitate data analysis. Instructions for modifying the relevantenvironment variables, if necessary, are given below.
The advantage of installing in /usr/local is that, because this putsexecutables in a standard location, the operating system should beable to automatically find the pscf executable. If you are not anexperienced unix programmer, we recommend that you install in a userdirectory (either the pscf/ tree or the user .local directory) ratherthan in /usr/local.
Invoke cmake
The first step of compiling with cmake is to invoke the cmake commandin order to construct a set of makefiles that contain instructions forbuilding the system. To begin, change directory (cd) to the pscf/cmake/directory. Then make sure the cmake/ directory is empty, and remove anycontents if necessary. From there, enter:
In this command, the string “/path/to/install” denotes the path to theroot of the install directory. The last argument, “./git”, is therelative path to your copy of the source code repository, in pscf/git,from the pscf/cmake directory.
To install within in the pscf/ directory tree, you would enter cd topscf/cmake and then:
Here, “.” represents the pscf/ directory, which is the parent of thepscf/cmake directory from which the command is issued. This will causethe later creation of bin/, lib/ and share/ subdirectories of thepscf/ directory alongside the cmake/ and git/ repository. This methodthus creates a directory structure:
in which all of the files associated with pscf (including sourceand executable files) are placed in a single directory tree withthe users home directory tree.
To install in the .local subdirectory of your home directory, insteadenter:
in which the tilde (~) is linux shortand for the users home directory.
Finally, to install in the /usr/local directory, you need adminstratorprivileges on your machine, and would enter:
No “-DCMAKE_INSTALL_PREFIX=” option is required in this case because/usr/local is the default installation used by cmake if no alternativeis specified.
Invoke make
The cmake command described above should create several subdirectoriesof the pscf/cmake/ directory, which contain makefiles with instructionsfor building pscf. To actually compile and install the program, simplyenter:
from the pscf/cmake directory. The “-j4” option simply instructs themake utility to use up to 4 processor cores to compile, if available,to speed up compilation. It is not required. The first “make” commandcompiles the code and places all the files generated by compilationin the pscf/cmake directory. The “make install” command then installsthe executable and other files files in the bin/, lib/ and share/subdirectories of the chosen installation directory.
After the “make install” finishes execution, check that your choseninstall directory contains subdirectories named bin/, lib/ and share/,and that the the bin/ subdirectory contains an executable file named pscf,along with several executable scripts whose names begin with the suffix“pscf-…”. One of these should be a bash script named “pscf-env”.
If you install in the /usr/local directory, you will need to haveadministrator privileges on the your computer, and will need to usethe “sudo” command to run “make install” as the “super-user”, byentering:
In this case, you will be prompted for your password.
Modifying Search Paths¶
If you install pscf in a directory within your home directory tree,you may need to modify a few environment variables to allow theoperating system to find the pscf program when it is invoked fromthe command line by name, and to allow the python interpreter to findsome associated python modules that are useful for data analysis.
Changing Paths
The simplest way to make the required changes to your user environmentis to cd to bin/ subdirectory of the root install directory and, fromthere, enter:
This will run a script that is installed by PSCF, which adds theappropriate paths to your PATH and PYTHONPATH environment variables.
Alternatively, to make the required changes manually, you could simplyenter the commands:
where “install” denotes an absolute path to the root installationdirectory that you chose when compiling.
If you installed pscf on Mac OS X using the .dmg installer, the rootinstall directory (the directory that contains the relevant bin/ andlib/ subdirectories) is the directory:
In this case, to run the pscf-env script, you must either cd to thebin subirectory of that directory, or use the following command usingthe absolute path:
If you installed pscf using a .deb or .rpm binary installer onlinux, the root install directory is /usr/local and the path to thepscf-env script is /usr/local/bin/pscf-env.
Making Changes Permanent
The above procedures (running pscf-env script or manually setting therelevant environment variables) only modifies the $PATH and $PYTHONPATHvariables temporarily, until you close the terminal window or log out.To have the appropriate directories added to these environment variablesautomatically whenever you log in or open a terminal, simply add thecommand:
to the .bashrc file or (on Mac OS X) .profile configuration file inyour home directory. Here, the string “install/” is a placeholder forthe absolute path to the pscf install directory.
Configuration files: Linux vs. Mac OS X
On linux, after a user logs in, the operating system looks for a filein the user directory named .profile or .bash_profile (in that order)and executes the first of these files that finds, if any. When youopen a new interactive shell that is not a login shell, e.g., byopening a new termiinal, it instead looks for and (if it exists)executes a file named .bashrc in the users home directory. To makesure that the modifications of the environment are applied to bothlogin and non-login terminals, the .bashrc file is normally executedby the .profile or .bash_profile file, by a command such as:
This part of the .profile or .bash_profile file checks if there isa .bashrc file in the users home directory and, if one is found,executes that file. With this configuration, commands that set upenvironment variables should be added to the .bashrc file.
On Mac OS X, the Mac Terminal program instead executes the .profilescript whenever you open a terminal, rather than using differentfiles for login and non-login terminals. The Mac Terminal programthus thus does not ever directly execute the .bashrc file. A Macuser that always uses the Mac Terminal program could thus eitheruse the procedure described above (which would still work correctly),or simply place all commands that customize the user environmentinto the .profile script.