2017-02-14 4 views
0

私は、提案されたcmakeルートを使ってtrilinosパッケージをインストールしようとしています。私はcmakeの経験はありませんが、私が見つけたサンプルのbashスクリプトがあります。このスクリプトを実行しようとすると、エラーが発生します。cmakeは変数がディレクトリだと思っています

CMakeエラー:ソースディレクトリ "/ home/USER/code/packages/trilinos_build/MPI_EXEC:FILEPATH =/usr/bin/pkg/mpiexec"は存在しません。 使用のために--helpを指定するか、CMake GUIのヘルプボタンを押してください。

私はcmakeのドキュメントをチェックしましたが、構文が正しいと確信しています。何が欠けていますか?白の最後の行と$ EXTRA_ARGS \の間に入るので

#!/bin/bash 

# Set this to the root of your Trilinos source directory. 
TRILINOS_PATH=../trilinos_source 
TRILINOS_BUILD_PATH=./ 

# 
# You can invoke this shell script with additional command-line 
# arguments. They will be passed directly to CMake. 
# 
[email protected] 

# 
# Each invocation of CMake caches the values of build options in a 
# CMakeCache.txt file. If you run CMake again without deleting the 
# CMakeCache.txt file, CMake won't notice any build options that have 
# changed, because it found their original values in the cache file. 
# Deleting the CMakeCache.txt file before invoking CMake will insure 
# that CMake learns about any build options you may have changed. 
# Experience will teach you when you may omit this step. 
# 
rm -f CMakeCache.txt 

# 
# Enable all primary stable Trilinos packages. 
# 
cmake \ 
    -D CMAKE_INSTALL_PREFIX:FILEPATH="${TRILINOS_BUILD_PATH}/mpi" \ 
    -D CMAKE_BUILD_TYPE:STRING=RELEASE \ 
    -D Trilinos_ENABLE_TESTS:BOOL=OFF \ 
    -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \ 
    -D TPL_ENABLE_MPI:BOOL=ON \ 
    -D MPI_EXEC:FILEPATH="/usr/bin/pkg/mpiexec" \ 


$EXTRA_ARGS \ 
$TRILINOS_PATH 
+0

私は確信していませんが、 '$ EXTRA_ARGS'とそれ以降のパラメータはcmakeに渡されないようです:前のパラメータからいくつかの行で区切られ、行末の '\'は次のライン。ところで、スクリプトを使うのではなく、適切なパラメータで直接呼び出すことで、 'cmake'の呼び出しをデバッグできます。 – Tsyvarev

+0

それはすべてだった、あまりにも多くの空白。ありがとう。 – roro

答えて

0

私はcmakeのと同様の問題を持って、それがあります。空行を削除すれば、エラーは消えてしまいます。

ので、あなたのファイルは次のようにする必要があります:あなたは、同じエラーが表示されます-Dオプションの間#によって任意の行をコメントしている場合も

#!/bin/bash 

# Set this to the root of your Trilinos source directory. 
TRILINOS_PATH=../trilinos_source 
TRILINOS_BUILD_PATH=./ 

# 
# You can invoke this shell script with additional command-line 
# arguments. They will be passed directly to CMake. 
# 
[email protected] 

# 
# Each invocation of CMake caches the values of build options in a 
# CMakeCache.txt file. If you run CMake again without deleting the 
# CMakeCache.txt file, CMake won't notice any build options that have 
# changed, because it found their original values in the cache file. 
# Deleting the CMakeCache.txt file before invoking CMake will insure 
# that CMake learns about any build options you may have changed. 
# Experience will teach you when you may omit this step. 
# 
rm -f CMakeCache.txt 

# 
# Enable all primary stable Trilinos packages. 
# 
cmake \ 
    -D CMAKE_INSTALL_PREFIX:FILEPATH="${TRILINOS_BUILD_PATH}/mpi" \ 
    -D CMAKE_BUILD_TYPE:STRING=RELEASE \ 
    -D Trilinos_ENABLE_TESTS:BOOL=OFF \ 
    -D Trilinos_ENABLE_ALL_PACKAGES:BOOL=OFF \ 
    -D TPL_ENABLE_MPI:BOOL=ON \ 
    -D MPI_EXEC:FILEPATH="/usr/bin/pkg/mpiexec" \ 
$EXTRA_ARGS \ 
$TRILINOS_PATH 

。 cmakeの後に\すべての行は連続していなければなりません。

希望すると助かります!

関連する問題