CMake Error at CMakeLists.txt:249 (string): string sub-command COMPARE, mode EQUAL needs at least 5 arguments total to command.

I have downloaded a project called Febio Studio, for which I can have no help of those who I downloaded it from, and am running into a wall that I cannot comprehend. I hope someone here can shed some light to help this absolute noob understand what’s going on and maybe fix it. :sob: :sob:

I have a project that uses CMake to build and then to compile the project, and when I try to “configure” it for first, I get the error:
“CMake Error at CMakeLists.txt:249 (string): string sub-command COMPARE, mode EQUAL needs at least 5 arguments total to command.”

The line 249 in question reads:
" string(COMPARE EQUAL ${BRANCH_NAME} “master” ISMASTER)"

How to solve it? Please ~Is there someone can help? I am really deseperate :scream: :persevere:

It’s hard to tell for sure without analysing the project, but from the naming of the variables, I guess BRANCH_NAME is supposed to be automatically filled when the build is started from a (git?) repository.
You probably only have a code snapshot, which makes BRANCH_NAME empty, causing the line

string(COMPARE EQUAL ${BRANCH_NAME} "master" ISMASTER)

to effectively become:

string(COMPARE EQUAL "master" ISMASTER)

and CMake rightfully complains about it.

Maybe try actually cloning the github repository (GitHub - febiosoftware/FEBioStudio), and work with that?

Thank you very much,my dear friend! It has been a while since I solved it,so I cannot quite remember how to fix it.

Probably I downloaded git on my computer,then re-downloaded the FS but for the lateat version.
After that I compiled the parallel code for a large open source project called FeBio than the error vanished.